package com.csdj.t309.papermanage.service;

import com.csdj.t309.papermanage.entity.TUser;
import com.csdj.t309.papermanage.entity.TUserExample;
import com.csdj.t309.papermanage.mapper.TUserMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class TuserService implements ITUserService{
    @Resource
    private TUserMapper tUserMapper;

    @Override
    public TUser login(String userCode, String userPassword) {
        TUserExample userExample = new TUserExample();
        userExample.createCriteria().andUserCodeEqualTo(userCode).andUserPasswordEqualTo(userPassword);
        TUser user = tUserMapper.selectByExample(userExample).get(0);
        return user;
    }
}
